<?php

class Request {

  private static $_instance;

  function __construct() {
    
  }

  public static function current() {
    if (self::$_instance === NULL) {
      self::$_instance = new self();
    }
    return self::$_instance;
  }

  /**
   * @return bool
   */
  public function isGet() {
    return isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] == 'GET' : false;
  }

  /**
   * @return bool
   */
  public function isPost() {
    return isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] == 'POST' : false;
  }
}